package org.hilo.boot.app.log;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>API调用日志 数据实体类</p>
 *
 * @author auto-generator
 * @since 2022-01-25
 */
public class ApiLogDto implements Serializable {

    private static final long serialVersionUID = 590014445523808711L;

    /**
     * 账号唯一ID
     */
    protected String reqAccount;

    /**
     * 客户端IP
     */
    protected String reqClientIp;

    /**
     * 客户端编码
     */
    protected String reqClient;

    /**
     * 本次请求的traceId
     */
    protected String reqId;

    /**
     * 操作开始时间
     */
    protected Date reqBegintime;

    /**
     * 服务方标识，一般为appId
     */
    protected String httpProvider;

    /**
     * 服务方的host
     */
    protected String httpHost;

    /**
     * 请求uri地址
     */
    protected String httpUri;

    /**
     * 请求方法
     */
    protected String httpMethod;

    /**
     * HTTP请求的文本参数信息,toJSON
     */
    protected String httpParam;

    /**
     * HTTP请求Body参数,toJSON，只支持POST PUT PATCH且MediaType为json,xml
     */
    protected String httpBody;

    /**
     * HTTP请求Body的ContentType
     */
    protected String httpContentType;

    /**
     * 1-CharacterEncoding,2-ContentLength,3-Locale
     */
    protected String httpExtraInfo;

    /**
     * HTTP请求头信息（不含user-agent，JSON格式）
     */
    protected String httpHeader;

    /**
     * HTTP的user-agent
     */
    protected String httpUserAgent;

    /**
     * 操作结果，1成功或者0失败
     */
    protected Integer resResultType;

    /**
     * 操作结果描述（1、简单描述：成功-失败，2、自定义描述）
     */
    protected String resResultDesc;

    /**
     * 操作处理耗时
     */
    protected Long resCost;

    /**
     * 日志logId
     */
    protected String resLogId;

    public String getReqAccount() {
        return reqAccount;
    }

    public void setReqAccount(String reqAccount) {
        this.reqAccount = reqAccount;
    }

    public String getReqClientIp() {
        return reqClientIp;
    }

    public void setReqClientIp(String reqClientIp) {
        this.reqClientIp = reqClientIp;
    }

    public String getReqClient() {
        return reqClient;
    }

    public void setReqClient(String reqClient) {
        this.reqClient = reqClient;
    }

    public String getReqId() {
        return reqId;
    }

    public void setReqId(String reqId) {
        this.reqId = reqId;
    }

    public Date getReqBegintime() {
        return reqBegintime;
    }

    public void setReqBegintime(Date reqBegintime) {
        this.reqBegintime = reqBegintime;
    }

    public String getHttpProvider() {
        return httpProvider;
    }

    public void setHttpProvider(String httpProvider) {
        this.httpProvider = httpProvider;
    }

    public String getHttpHost() {
        return httpHost;
    }

    public void setHttpHost(String httpHost) {
        this.httpHost = httpHost;
    }

    public String getHttpUri() {
        return httpUri;
    }

    public void setHttpUri(String httpUri) {
        this.httpUri = httpUri;
    }

    public String getHttpMethod() {
        return httpMethod;
    }

    public void setHttpMethod(String httpMethod) {
        this.httpMethod = httpMethod;
    }

    public String getHttpParam() {
        return httpParam;
    }

    public void setHttpParam(String httpParam) {
        this.httpParam = httpParam;
    }

    public String getHttpBody() {
        return httpBody;
    }

    public void setHttpBody(String httpBody) {
        this.httpBody = httpBody;
    }

    public String getHttpContentType() {
        return httpContentType;
    }

    public void setHttpContentType(String httpContentType) {
        this.httpContentType = httpContentType;
    }

    public String getHttpExtraInfo() {
        return httpExtraInfo;
    }

    public void setHttpExtraInfo(String httpExtraInfo) {
        this.httpExtraInfo = httpExtraInfo;
    }

    public String getHttpHeader() {
        return httpHeader;
    }

    public void setHttpHeader(String httpHeader) {
        this.httpHeader = httpHeader;
    }

    public String getHttpUserAgent() {
        return httpUserAgent;
    }

    public void setHttpUserAgent(String httpUserAgent) {
        this.httpUserAgent = httpUserAgent;
    }

    public Integer getResResultType() {
        return resResultType;
    }

    public void setResResultType(Integer resResultType) {
        this.resResultType = resResultType;
    }

    public String getResResultDesc() {
        return resResultDesc;
    }

    public void setResResultDesc(String resResultDesc) {
        this.resResultDesc = resResultDesc;
    }

    public Long getResCost() {
        return resCost;
    }

    public void setResCost(Long resCost) {
        this.resCost = resCost;
    }

    public String getResLogId() {
        return resLogId;
    }

    public void setResLogId(String resLogId) {
        this.resLogId = resLogId;
    }

    @Override
    public String toString() {
        StringBuilder builder = new StringBuilder();
        builder.append("ApiLogDto [");
        builder.append("reqAccount=").append(reqAccount);
        builder.append(", reqClientIp=").append(reqClientIp);
        builder.append(", reqClient=").append(reqClient);
        builder.append(", reqId=").append(reqId);
        builder.append(", reqBegintime=").append(reqBegintime);
        builder.append(", httpProvider=").append(httpProvider);
        builder.append(", httpHost=").append(httpHost);
        builder.append(", httpUri=").append(httpUri);
        builder.append(", httpMethod=").append(httpMethod);
        builder.append(", httpParam=").append(httpParam);
        builder.append(", httpBody=").append(httpBody);
        builder.append(", httpContentType=").append(httpContentType);
        builder.append(", httpExtraInfo=").append(httpExtraInfo);
        builder.append(", httpHeader=").append(httpHeader);
        builder.append(", httpUserAgent=").append(httpUserAgent);
        builder.append(", resResultType=").append(resResultType);
        builder.append(", resResultDesc=").append(resResultDesc);
        builder.append(", resCost=").append(resCost);
        builder.append(", resLogId=").append(resLogId);
        builder.append("]");
        return builder.toString();
    }

}
